﻿#include "appsence.h"

AppSence::AppSence()
{

}

void AppSence::addStock(Stock *stock)
{
    m_stockMap.insert(stock->id(), stock);
    m_currentStock = stock;
}

void AppSence::setCurrentStock(QString stockID)
{
    m_currentStock = m_stockMap.value(stockID);
}

QList<QString> AppSence::allStockID()
{
    return m_stockMap.keys();
}

Stock* AppSence::currentStock()
{
    return m_currentStock;
}
